package com.example.messages.test;

import java.text.SimpleDateFormat;
import java.util.Date;

public class time {
    public static void main(String[] args) {
        Date date = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
        System.out.println("当前时间: " + formatter.format(date));
    }
}
